1 <?php
2 include(
"header.php");
3 include(
"sidebar.php");
4 include(
"dbconnection.php");
5 if
(isset($_GET['delid']))
6 {
7 $result = mysql_query(
"delete from vehicle where sellno = '$_GET[delid]'");
8 }
9 $result= mysql_query(
"select * from vehicle");
10 ?>
11         
12                             
13         <div id=
"main">
14             
15             <a name=
"TemplateInfo"></a>
16             <h1>Sell Vehicle</h1>
17             <?php

18 if
($ctins == 1)
19 {
20     echo
"<center><b>Employees account created successfully...</b></center><br>";
21     echo
"<center><b><a href='emplogin.php'>Click here to Login.</a></b></center>";
22 }

23 else

24 {
25     ?>
26         <form id=
"form1" name="form1" method="post" action="">
27           <table width=
"514" border="1">
28             <tr>
29               <th width=
"33" height="42" scope="col">SL <br />
30               No.</th>
31               <th width=
"102" scope="col">Image</th>
32               <th width=
"208" scope="col">Vehicle info</th>
33     
34         <th width=
"55" scope="col">Other<br />
35         Info</th>
36               <th width=
"82" scope="col">Vehicle <br />
37               status</th>
38               <th width=
"120" scope="col">Actions</th>
39             </tr>
40              <?php
41              $i=
1;
42           
while($arrrec= mysql_fetch_array($result))
43             {
44
45           echo
" <tr>
46               <td scope='col'>&nbsp;$i</td>
47               <td scope='col'> <img src='upload/$arrrec[images]' height='
75' width='100' > </td>
48               <td scope='col'><b>Vehicle Name:</b> $arrrec[vehname]<br />
49                             <b>Vehicle model:</b> $arrrec[model]<br />
50                            <b> Brand:</b> $arrrec[brand]<br />
51                             <b>Estimated price:</b> $arrrec[estmdprice]<br />
52                             </td>
53               <td scope='col'><a href='viewsellvehiclemore.php?vehicleid=$arrrec[sellno]'>More</a></td>
54               <td scope='col'>&nbsp;$arrrec[status]</td>
55               <td scope='col'>"
;
56               
57               
if($arrrec[status] == 'Pending')
58               {
59               ?>
60               <?php echo
"<a href='sellvehicle.php?updtid=$arrrec[sellno]'>Update</a>|<a href='viewsellvehicle.php?delid=$arrrec[sellno]'>Delete</a>";
61                }
62                
else if($arrrec[status] == 'Accepted')
63                 {
64                 ?>
65                 <?php echo
"Purchased</td>";
66                 }
67                 
else
68                 {
69                     echo
"Rejected";
70                 }
71                 ?>
72                 
73             <?php
"</tr>";
74 $i++;
75           }
76           ?>
77
78           </table>
79         </form>
80     <?php
81     }
82     ?>
83             <p>&nbsp;</p>
84 <br />
85                                             
86         </div>
87         
88 <!-- wrap ends here -->
89 </div>
90         
91 <?php
92 include(
"footer.php");
93 ?>


Gõ tìm kiếm nhanh...